package com.lhl.type1;

/**
 * 责任链顺序配置
 * @author hanLin.liu
 * @create 2024-10-10 17:41
 */
public class HandlerChain {
    AbstractHandler firstHandler;

    public HandlerChain(AbstractHandler firstHandler){
        this.firstHandler = firstHandler;
    }

    public void handlerRequest(int request){
        if (this.firstHandler != null) {
            this.firstHandler.handle(request);
        }
    }
}
